package com.celesea.auth.core.util;


import com.celesea.auth.core.entity.BusEntity;

public class BusUtil {
	/**
	 * 自动处理业务属性
	 * 
	 * @param model
	 */
	public static void busAuto(BusEntity model) {
		if (StringKit.isEmpty(model.getId())) {
			busCreateInfo(model);
		}
		busUpdateInfo(model);
	}

	/**
	 * 业务创建人信息
	 */
	public static void busCreateInfo(BusEntity model) {
//		SysUser user = UserUtil.getLoginSysUser();
//		model.setCreateId(user.getId());
//		model.setCreateName(user.getLoginName());
//		model.setCreateTime(Calendar.getInstance().getTime());
	}

	/**
	 * 处理业务更新人信息
	 * 
	 */
	public static void busUpdateInfo(BusEntity model) {
//		SysUser user = UserUtil.getLoginSysUser();
//		model.setUpdateId(user.getId());
//		model.setUpdateName(user.getLoginName());
//		model.setUpdateTime(Calendar.getInstance().getTime());
	}

//	/**
//	 * 处理业务查询是的创建人信息
//	 *
//	 * @param queryParam
//	 */
//	public static void busQuery(QueryParam queryParam) {
//		if (queryParam != null) {
//			queryParam.put("createId", UserUtil.getLoginSysUserId());
//		}
//	}
}
